package com.example.mqltest.dao;


import com.example.mqltest.entity.Student;
import com.example.mqltest.entity.Teacher;
import com.example.mqltest.entity.Work;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TeacherDao{
    Teacher Login(@Param( "userId" )String userId, @Param( "password" )String password);

    void register(@Param( "teacher" ) Teacher teacher);

    List<Teacher> getTeacherByCode(@Param( "code" )String code);

    void deleteStudent(@Param( "code" ) String code,@Param( "studentId" ) String studentId);

    void addWork(@Param( "work" ) Work work);

    void addWorkList(@Param( "workId" )int workId,@Param("studentId") String studentId);

    void archiveCourse(@Param( "code" ) String code,@Param( "teacherId") String teacherId,@Param( "archive" )String archive);

    void upLoadHead(@Param( "teacherId" )String teacherId,@Param( "avatarPath" )String avatarPath);

    Teacher getTeacherById(@Param( "id" )String id);

    Teacher getTeacherByPhoneNum(@Param( "phoneNum" )String phoneNum);

    void joinCourse(@Param( "code" ) String code,@Param( "teacherId" ) String teacherId);

    String IsJoinCourse(@Param( "code" ) String code,@Param( "teacherId" ) String teacherId);

}
